<?php
namespace Admin\Models\pm;
use Admin\Models\pm\basicModel;

class XhwoWorkOrder extends basicModel
{

    /**
     *
     * @var integer
     * @Primary
     * @Identity
     * @Column(type="integer", length=10, nullable=false)
     */
    public $iWorkOrderId;

    /**
     *
     * @var string
     * @Primary
     * @Identity
     * @Column(type="string", length=100, nullable=true)
     */
    public $sWorkOrderName;

    /**
     *
     * @var integer
     * @Column(type="integer", length=10, nullable=true)
     */
    public $iParentId;

    /**
     * @var string
     * @Column(type="string", length=300, nullable=true)
     */
    public $sWorkOrderContent;

    /**
     *
     * @var integer
     * @Column(type="integer", length=1, nullable=true)
     */
    public $iLevel;

    /**
     *
     * @var integer
     * @Column(type="integer", length=1, nullable=true)
     */
    public $iWorkOrderStatus;

    /**
     *
     * @var integer
     * @Column(type="integer", length=1, nullable=true)
     */
    public $iProcess;

    /**
     *
     * @var string
     * @Column(type="string", nullable=true)
     */
    public $sRemarks;

    /**
     *
     * @var integer
     * @Column(type="integer", length=10, nullable=true)
     */
    public $iTemplateId;

    /**
     *
     * @var integer
     * @Column(type="integer", length=4, nullable=true)
     */
    public $bDelete;

    /**
     *
     * @var string
     * @Column(type="string", nullable=true)
     */
    public $tCreateDate;

    /**
     *
     * @var string
     * @Column(type="string", length=20, nullable=true)
     */
    public $iCreateUserId;

    /**
     *
     * @var string
     * @Column(type="string", nullable=true)
     */
    public $tLastModifyDate;

    /**
     *
     * @var string
     * @Column(type="string", length=20, nullable=true)
     */
    public $iLastModifyUserId;

    /**
     *
     * @var string
     * @Column(type="string", nullable=true)
     */
    public $tFromAt;

    /**
     *
     * @var string
     * @Column(type="string", nullable=true)
     */
    public $tEndAt;

    /**
     *
     * @var decimal
     * @Column(type="decimal", nullable=true)
     */
    public $dWorkTime;

    /**
     *
     * @var string
     * @Column(type="string", nullable=true)
     */
    public $tStartedAt;

    /**
     *
     * @var string
     * @Column(type="string", nullable=true)
     */
    public $tFinishedAt;

    /**
     *
     * @var string
     * @Column(type="string", nullable=true)
     */
    public $sExplain;

    /**
     *
     * @var string
     * @Column(type="string", nullable=true)
     */
    public $sComments;

    /**
     *
     * @var string
     * @Column(type="string", nullable=true)
     */
    public $sEnclosure;

    /**
     *
     * @var integer
     * @Column(type="integer", length=1, nullable=true)
     */
    public $bIfChecked;

    /**
     *
     * @var integer
     * @Column(type="integer", length=1, nullable=true)
     */
    public $bIfMultiple;


    public function initialize()
    {
        $this->setSource("XHWo_WorkOrder");
    }

    /**
     * Returns table name mapped in the model.
     *
     * @return string
     */
    public function getSource()
    {
        return 'XHWo_WorkOrder';
    }


    /**
     * Allows to query a set of records that match the specified conditions
     *
     * @param mixed $parameters
     * @return
     */
    public static function find($parameters = null)
    {
        return parent::find($parameters);
    }

    /**
     * Allows to query the first record that match the specified conditions
     *
     * @param mixed $parameters
     * @return
     */
    public static function findFirst($parameters = null)
    {
        return parent::findFirst($parameters);
    }

}
